package com.lockmem.DB;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;

import android.content.Context;
import android.util.Log;

public class FileCtrl {
	public static String getDBString(Context con){
		String nr = null;
		try {
			InputStream is = con.getResources().getAssets().open("db");
			int ch = 0 ; 
			ByteArrayOutputStream baos = new ByteArrayOutputStream();
			while((ch = is.read())!=-1){
				baos.write(ch);
			}
			byte[] buff = baos.toByteArray();
			baos.close();
			is.close();
			nr = new String(buff,"UTF-8");
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return nr;
	}
}
